var t, e = function(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}(require("../../../utils/tools.js"));

getApp();

Page({
    data: {},
    onLoad: function(e) {
        t = this;
    },
    onReady: function() {},
    onShow: function() {
        var a = {
            action: "log",
            contr: "treasure",
            token: wx.getStorageSync("token")
        };
        e.default.request(a, function(e) {
            t.setData(e.info);
        });
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    gotoTreasure: function() {
        wx.redirectTo({
            url: "/bh_farm/pages/treasure/treasure"
        });
    },
    gotoDetail: function(t) {
        var e = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/bh_farm/pages/detail/detail?id=" + e
        });
    },
    copy: function(t) {
        var e = t.currentTarget.dataset.value;
        wx.setClipboardData({
            data: e,
            success: function() {
                wx.showToast({
                    title: "复制成功",
                    mask: "none"
                });
            }
        });
    },
    addAddress: function() {
        wx.navigateTo({
            url: "/bh_farm/pages/address/address"
        });
    },
    onShareAppMessage: function() {
        return {
            title: this.data.share.text,
            imageUrl: this.data.share.images,
            path: "bh_farm/pages/index/index?parent_id=" + this.data.share.member_id
        };
    }
});